63 Matching Annotations
  1. Dec 2024
  2. Apr 2024
    1. Pod System là gì, có gì khác so với thuốc lá điện tử (vape) thông thường? Với những bạn mới tập chơi bộ môn khói này có lẽ còn phân vân với hai dòng sản phẩm này. Vì vậy, ngay bài viết dưới đây, Vape Pod 365 sẽ giúp bạn hiểu rõ hơn và tìm được địa chỉ uy tín để mua nhé!

      Khái niệm Pod System là gì?

  3. Nov 2023
  4. Oct 2023
  5. Sep 2023
  6. Nov 2022
  7. Aug 2022
  8. May 2022
    1. You should mentioned what you listed after the word try_files. Here's what I ended up using that seemed to work: try_files $uri $uri/index.html $uri.html /index.html; The /index.html at the end needs to match the fallback: 'index.html' part of your adapter-static config. Otherwise going directly to a route that doesn't have a matching file at that path -- such as any route with a dynamic param like [id] -- will result in a 404.
  9. Jan 2022
    1. Dr. Thrasher wrote a book! (2022, January 8). My cousin wanted to get tested. She waited in an auto testing line for 6.5 hours, and stayed in it bc she was traveling to bury her Daddy. How many people give up in such long lines? How many cases upwards of a million are we losing bc Biden et all failed on home tests? Https://t.co/Q7WVy5qD4v [Tweet]. @thrasherxy. https://twitter.com/thrasherxy/status/1479826389142491146

    1. export const load: Load = async ({ page, session }) => { if (!isPublic(page.path) && !isAuthenticated(session)) { console.log('Unauthorized access to private page'); return { redirect: '/', status: 302 }; } else { console.log('Auth OK'); } return {}; };
    2. In hooks.js I have a handle function that basically does request.locals.jwt = cookies.jwt, and then a getSession function that returns { jwt: locals.jwt }
    1. It has many advantages but the main reason for me is that it simplifies your front end code. It's not perfect by any means, but overall its cons are worth it IMO.
    1. import { goto } from '$app/navigation'; function routeToPage(route: string, replaceState: boolean) { goto(`/${route}`, { replaceState }) } replaceState == true will replace the route instead of adding to the browser history. So, when you click back, you will not go back to the route you came from.
  10. Dec 2021
  11. Nov 2021
  12. Oct 2021
    1. while with server/externalFetch there is no direct way to pass cookie headers from the original request to the external one
    2. Right now I am working around this issue by having an internal [...api].js, then call fetch for that endpoint (which automatically passes on cookies) and from there hit the actual external endpoint. It works, there is no risk of leaking anything, but imo shouldn't be necessary.
    3. Sure you can abuse session but I don't like that since there is the risk of exposing credentials to client side code.
    4. I am currently circumventing this issue by using getSession to have access to the cookies/headers in the load method

      We did something similar for a while...

    1. This function allows you to modify (or replace) a fetch request for an external resource that happens inside a load function that runs on the server (or during pre-rendering). For example, your load function might make a request to a public URL like https://api.yourapp.com when the user performs a client-side navigation to the respective page, but during SSR it might make sense to hit the API directly (bypassing whatever proxies and load balancers sit between it and the public internet).
  13. Sep 2021
    1. The Geek Bar by GeekVape is completely disposable

      GeekVape Geekbar kit is completely disposable. This next generation 20MG vape device kit is pre-filled with 20mg nicotine salt e-liquid. No need to refill, recharge or mess around with coils or pods.

  14. Jun 2021
    1. export function get(req, res) { if (req.headers.authorization) { res.writeHead(200); res.end(JSON.stringify({ message: req.headers.authorization })); } else { res.writeHead(200); res.end(JSON.stringify({ message: 'unauthorized' })); } }
  15. May 2021
    1. if (parsed.protocol) { // external fetch response = await fetch(parsed.href, /** @type {import('node-fetch').RequestInit} */ (opts)); } else { // otherwise we're dealing with an internal fetch const resolved = resolve(request.path, parsed.pathname);
    1. This function runs on every request, for both pages and endpoints, and determines the response. It receives the request object and a function called resolve, which invokes SvelteKit's router and generates a response accordingly.
    2. This allows you to modify response headers or bodies, or bypass SvelteKit entirely
    1. CSR asking my Python backed directly (over nginx). Basically, in my particular situation, I want to use most shorter paths for SSR or CSR cases when I have a separate API server under the same domain and nginx frontend.
    2. on CSR it connects to the svelte-kit endpoint which just use a localhost connection. and to optimize this you can use unix sockets in your endpoints to connect to backend server
    3. ah you are talking about a external api endpoint server? then you could use the svelte-kit endpoints as proxy handler
    1. This looks cool but right now, let's say i have an external api which depends on users cookies, the cookies only gets send through internal sk endpoints while ssr even if its the same domain. Couldn't we pass the 'server' request to the serverFetch hook? I would currently have to patch package svelte kit to pass request headers to the external api or create an sk endpoint which proxies the request.
  16. Oct 2020
    1. Kits rock! But understanding what is going on at each stage of the protocol provided with the kit really helps with troubleshooting and modification.
  17. Sep 2020
  18. Aug 2020
  19. May 2020
    1. Chu, H. Y., Englund, J. A., Starita, L. M., Famulare, M., Brandstetter, E., Nickerson, D. A., Rieder, M. J., Adler, A., Lacombe, K., Kim, A. E., Graham, C., Logue, J., Wolf, C. R., Heimonen, J., McCulloch, D. J., Han, P. D., Sibley, T. R., Lee, J., Ilcisin, M., … Bedford, T. (2020). Early Detection of Covid-19 through a Citywide Pandemic Surveillance Platform. New England Journal of Medicine, NEJMc2008646. https://doi.org/10.1056/NEJMc2008646

  20. Mar 2020