domasch
domasch
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
{
"/api": {
"target": "https://myservice.railway.internal",
"secure": false,
"changeOrigin": true,
"pathRewrite": {
"^/api": "/api/v1"
}
}
}
{
"/api": {
"target": "https://myservice.railway.internal",
"secure": false,
"changeOrigin": true,
"pathRewrite": {
"^/api": "/api/v1"
}
}
}
this is my proxyconf
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
export const environment = {
production: false,
backendUrl: 'https://myservice.railway.internal/api/v1'
// backendUrl: 'http://localhost:8080/api/v1'
};
export const environment = {
production: false,
backendUrl: 'https://myservice.railway.internal/api/v1'
// backendUrl: 'http://localhost:8080/api/v1'
};
if using internal url do I need to change anything else? Request URL: https://myservice.up.railway.app/tiss-time-myservice.railway.internal/api/v1/register Request Method: POST this changed the request url to this for some reason
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
hmm
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
ah fixed it with --disable-host-check bt cors issue still here
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
When I deploy the frontne dI get invalid host header any ideas?
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
also tried changing proxyconf inn angular
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
idk what's going on tbh
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
and works like a charm
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
Yes I tried that alrady from http file
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
I know insecurenagain but I think I'm already allowing all remotes in my spring application how can CORS still be an isseu?
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
package at.ac.tuwien.sepr.groupphase.backend.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
@EnableWebMvc
public class WebConfig implements WebMvcConfigurer {

@Override
public void addCorsMappings(CorsRegistry registry) {
registry
.addMapping("/**")
.allowedMethods(CorsConfiguration.ALL)
.allowedHeaders(CorsConfiguration.ALL)
.allowedOriginPatterns(CorsConfiguration.ALL);
}
}
package at.ac.tuwien.sepr.groupphase.backend.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
@EnableWebMvc
public class WebConfig implements WebMvcConfigurer {

@Override
public void addCorsMappings(CorsRegistry registry) {
registry
.addMapping("/**")
.allowedMethods(CorsConfiguration.ALL)
.allowedHeaders(CorsConfiguration.ALL)
.allowedOriginPatterns(CorsConfiguration.ALL);
}
}
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
I tried it out locally now to access
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
interesting
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
//
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
but for now I wanna get it working
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
haha will do
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
that should do the trick right?
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
jpa: # Set this property to true if you want to see the executed queries
show-sql: false
hibernate:
ddl-auto: update
# Allows to fetch lazy properties outside of the original transaction. Although this sounds helpful, the property
# is disabled since it breaks the principle of least astonishment and leads to bad performance. To learn more,
# follow this link: https://bit.ly/2LaX9ku
open-in-view: false
database-platform: org.hibernate.dialect.PostgreSQLDialect
jpa: # Set this property to true if you want to see the executed queries
show-sql: false
hibernate:
ddl-auto: update
# Allows to fetch lazy properties outside of the original transaction. Although this sounds helpful, the property
# is disabled since it breaks the principle of least astonishment and leads to bad performance. To learn more,
# follow this link: https://bit.ly/2LaX9ku
open-in-view: false
database-platform: org.hibernate.dialect.PostgreSQLDialect
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
I though so too
41 replies
RRailway
Created by domasch on 1/6/2024 in #✋|help
Spring boot up and running after deployment but can't access via http
Do you think it is possible to use ddl auto mode to create the tables or is taht a bad idea>?
41 replies